<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <script src="http://www.jq22.com/jquery/jquery-1.10.2.js"></script>
</head>
<body>
  <button onclick="getData()">点击获取数据</button>
  <p id="text"></p>
</body>
</html>
<script type="text/javascript">
// function getData() {
//   $.ajax({
//     type: 'GET',
//     url: 'http://127.0.0.1:3000?id=20&&reid=99',
//     success: function (res) {
//       console.log(res);
//     }
//   })
// }

function getData() {
  $.ajax({
    type: 'POST',
    url: 'http://127.0.0.1:3000',
    data: {
      id: '10',
      test: 'test'
    },
    success: function (data) {
      console.log(data);
    }
  })
}
</script>
